import request from '@/utils/request'

// 获取文章分类列表
export const getArticleCategoryList = () => {
    return request.get('/category');
}

// 添加分类
export const addArticleCategory = (data) => {
    return request.post('/category', data);
}

// 编辑分类
export const editArticleCategory = (data) => {
    return request.put(`/category`, data);
}

// 删除分类
export const deleteArticleCategory = (id) => {
    let params = new URLSearchParams();
    params.append('id', id);
    return request.delete(`/category`, {params});
}